package org.minbox.framework.microservice.user.api;

import org.minbox.framework.microservice.common.entity.UserInfo;
import org.minbox.framework.microservice.openfeign.UserServiceClient;
import org.minbox.framework.microservice.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户服务对外提供的接口控制器
 *
 * @author 恒宇少年
 */
@RestController
public class UserController implements UserServiceClient {
    @Autowired
    private UserService userService;

    @Override
    public UserInfo findById(Integer userId) {
        return userService.selectById(userId);
    }
}
